#region Copyright Jonathan Quiros

//	
// All rights are reserved. Reproduction or transmission in whole or in 
// part, in any form or by any means, electronic, mechanical or otherwise, 
// is prohibited without the prior written consent of the copyright owner.
//
// Filename: GameList.cs
//

#endregion

using System.Collections;
using System.Collections.Generic;
using Ids.Utils;
using Ids.Web.Listing;

namespace Novagoal.Models.Utils
{
    #region enums
    public enum GameListSortField
    {
        [Value("teamId")]
        Id,
        [Value("teamA")]
        TeamA,
        [Value("teamB")]
        TeamB,
        [Value("tournament")]
        Tournament,
        [Value("start_at")]
        StartAt,
        [Value("created_at")]
        CreatedAt,
        [Value("updated_at")]
        UpdatedAt,
    }

    public enum GameListFilter
    {
        [Value("gameId")]
        Id,
        [Value("teamA")]
        TeamA,
        [Value("teamB")]
        TeamB,
        [Value("tournament")]
        Tournament
    }
    #endregion

    public class GameList : ListWrapper
    {
        #region Properties
        /// <summary>
        /// Gets or sets the counts.
        /// </summary>
        /// <value>The counts.</value>
        public new List<Game> Items
        {
            get
            {
                return (List<Game>)base.Items;
            }
            set
            {
                base.Items = value;
            }
        }

        /// <summary>
        /// Gets or sets the current sorting field.
        /// </summary>
        /// <value></value>
        public new GameListSortField SortField
        {
            get
            {
                return (GameListSortField)base.SortField;
            }
            set
            {
                base.SortField = value;
            }
        }

        /// <summary>
        /// Gets or sets the filters.
        /// </summary>
        /// <value>The filters.</value>
        public new Dictionary<GameListFilter, string> Filters
        {
            get
            {
                return (Dictionary<GameListFilter, string>)base.Filters;
            }
            set
            {
                base.Filters = value;
            }
        }
        #endregion

        #region Constructors
        public GameList()
        {
        }

        public GameList(GameListSortField sort, SortDirectionType dir, IDictionary filters)
            : base(sort, dir, filters)
        {
        }
        #endregion
    }
}